<?php
define('USERNAME_REQUIRED', TRUE);
define('ACCOUNT_REQUIRED', TRUE);
include('global.php');
define("THIS_SCRIPT", 'online_users');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

<html xmlns="http://www.w3.org/1999/xhtml"> 
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<head>
<title><?php echo $sitename." - ".$lang['online_users']; ?></title>
    <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
    <script type="text/javascript" src="Public/JS/jquery.history.js"></script>
    <link type="text/css" rel="stylesheet" href="Public/Styles/<?php echo $currentstyle ?>/CSS/main.css" />
</head> 
 
<body> 
 
<?php include("system/header_com.php"); ?>

	<div class="mainBox"> 
	
		<?php include("system/communitynav.php"); ?>

		<div class="mid" id="midcontent"> 

			<div class="column" id="column1">
            
				<div class="l_boxHeader_blue">
                
                	<div class="titel">
                    
						<?php echo $lang['online_users']; ?>
                        
                    </div>
                    
                </div>
                
				<div class="contentBox">
                
					<div class="boxContent">
                    
						<?php
						$userq = mysql_query("SELECT * FROM users WHERE online = '1' ORDER BY id ASC");
						
						if(mysql_num_rows($userq) == 0){
							
						echo 'Er zijn geen gebruikers online.';
						
						}
						
						$color = 'odd';
						
						while($user = mysql_fetch_array($userq))
						
						{
							
							echo'
							
								<div class="campaigncontainer" style="padding: 0px 0px 20px 0px" id="'.$color.'">
								
									<div class="StaffBox">
									
										<img src="http://www.habbo.com/habbo-imaging/avatarimage?figure='.$user["look"].'" alt="'.$user["username"].'" style="float:left" />
										
										<div class="Usersname"><a href="home.php?u='.$user["username"].'">'.$user["username"].'</a></div>
										
										<div class="Usersmotto">'.$user["motto"].'</div>
										
										<img src="./Public/Images/badges/'.$users->RankBadge($user['rank']).'.gif" alt="Teen Staff" /><br>
										
										'.$lang["logged_in_on"].' <b>'.@date("d-m-Y", $user["last_online"]).'</b> '.$lang['me_user_info_last_online_on'].' <b>'.@date("H:i", $user["last_online"]).'</b>
										
					
									</div>
									
								</div>
								
            					';
								
						if($color == 'odd')
						
						$color='even';
						
						else
						
						$color='odd';
						
						}
						?>
                        
					</div>
                    
				</div>
                
				<div class="l_boxBottom"></div>
                
			</div>

			<div class="column" id="column2">

				<?php include("system/news_widget.php") ?>

    		</div>
            
        </div>
		
		<?php include("system/sideads.php"); ?>

	</div> 

	<?php include("system/footer.php"); ?>
    
</div> 

</body> 
</html>